<?php
/**
 * 客户验证
 * @Author: wjf
 * @Date: 2022-11-26 14:51:23
*/

namespace app\crm\validate\customer;

use think\Validate;

class Customer extends Validate
{
    protected $rule =   [
        'name'  => 'require',
        'mobile' => 'require|mobile|unique:crm_customer',   
        'level_id' => 'require|integer', 
		'industry_id' => 'require|integer',  
		'source_id' => 'require|integer'  		
    ];
    
    protected $message  =   [
        'name.require' => '用户名不能为空',
        'mobile.require' => '手机号不能为空',
        'mobile.mobile' => '手机号格式不正确',
		'level_id.require' => '请选择用户级别',
		'industry_id.require' => '请选择用户行业',
		'source_id.require' => '请选择客户来源'
    ];
	
	protected $scene = [
        'import'  =>  ['name','mobile','level_id','industry_id','source_id'],
    ];
    
}